# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=quodlibet
pkgver=4.1.0
pkgrel=2
pkgdesc="An audio library tagger, manager and player"
arch=('any')
license=('GPL2')
url="https://github.com/quodlibet/quodlibet"
depends=('gtk3' 'python-gobject' 'python-dbus' 'python-cairo' 'python-mutagen' 'dbus-glib'
         'gst-plugins-base' 'gst-plugins-good' 'gst-plugins-ugly' 'python-feedparser')
makedepends=('intltool')
optdepends=('gst-libav: for ffmpeg (ASF/WMA) support'
            'gst-plugins-bad: for Musepack support'
            'libkeybinder3: for the multimedia keys support'
            'python-musicbrainzngs: for "MusicBrainz Lookup" plugin'
            'python-pyinotify: for "Automatic library update" plugin'
	    'kakasi: for "Kana/Kanji Simple Inverter" plugin'
            'gst-plugins-bad: for "Audio Pitch/Speed" plugin')
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/quodlibet/quodlibet/archive/release-${pkgver}.tar.gz)
sha1sums=('0def2aba89affa54b9f72a20109648e7af2981cd')

prepare() {
  cd ${pkgname}-release-${pkgver}/quodlibet
# Fix zsh completions dir
  sed -e 's|vendor-completions|site-functions|' -i gdist/zsh_completions.py
}

build() {
  cd ${pkgname}-release-${pkgver}/quodlibet
  python setup.py build
}

package() {
  cd ${pkgname}-release-${pkgver}/quodlibet
  python setup.py install --root="${pkgdir}"
}
